import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import WebIndex from '../views/web/Index.vue'

const routes = [
  // {
  //   path: '/web/index',
  //   name: 'web_index',
  //   component: WebIndex
  // },
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // },
  {
    path: '/web/index',
    name: 'web_index',
    component: () => import('../views/web/Index.vue')
    // component: WebIndex
  },
  {
    path: '/web/news/list',
    name: 'web_news_list',
    component: () => import('../views/web/news/List.vue')
    // component: WebIndex
  },
  {
    path: '/web/news/detail/:id',
    name: 'web_news_detail',
    component: () => import('../views/web/news/Detail.vue')
    // component: WebIndex
  },
  {
    path: '/web/talent/course_list/:project_id',
    name: 'web_talent_course_list',
    component: () => import('../views/web/talent/CourseList.vue')
  },
  {
    path: '/web/talent/course_detail/:hash_id',
    name: 'web_talent_course_detail',
    component: () => import('../views/web/talent/CourseDetail.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
